import _http from '@/utils/http'

export default {
    goodsList(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/search',
            apiName: '商品列表',
        }, params, loading, headers)
    },

    goodsDetail(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/detail',
            apiName: '商品详情',
        }, params, loading, headers)
    },

    goodsModify(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/update',
            apiName: '商品更新',
        }, params, loading, headers)
    },

    goodsDelete(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/delete',
            apiName: '商品删除',
        }, params, loading, headers)
    },

    goodsCreate(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/create',
            apiName: '商品新增',
        }, params, loading, headers)
    },

    goodsStatus(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/updateStatus',
            apiName: '商品上下架',
        }, params, loading, headers)
    },

    incomeRuleAll(params, loading, headers) {
        return _http('post', {
            url: '/eas/manage/product/commission/strategy/all',
            apiName: '佣金规则下拉',
        }, params, loading, headers)
    },

    ownerType(params, loading, headers) {
        return _http('post', {
            url: '/eas/api/enum/owner-type',
            apiName: '获取车主类型枚举值',
        }, params, loading, headers)
    },

    vehicleNature(params, loading, headers) {
        return _http('post', {
            url: '/eas/api/enum/vehicle-nature',
            apiName: '获取车辆性质枚举值',
        }, params, loading, headers)
    },
}
